package cn.hxlc.tie.demo.util;

import cn.hxlc.tie.libs.context.auth.LoginContext;

/**
 * 获取当前登录用户
 * @author zhangli
 * create  2021/05/19 12:21
 **/
public class  UserUtil {

    public static Long getUserid(){
        Long accountId = null;
        try {
            accountId = LoginContext.me().getLoginUser().getUserId();
        } catch (Exception e) {
            accountId = -1L;
        }
        return accountId;
    }
}
